home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / sort2.zip / ISATTY.FUN < prev    next >
Text File  |  1993-01-04  |  329b  |  11 lines

  1. { Call with 0 or 1 to see if standard input or output has been directed from
  2.   or to a file. }
  3.  
  4. function isatty(handle:word):boolean; var r: dos.registers; begin
  5.    with r do begin
  6.    ax:=$4400; bx:=handle; dos.msdos(r);
  7.    if (flags and fcarry)=0 then
  8.       isatty:= (ax and $80)<>0
  9.    else isatty:=false; end; end;
  10.  
  11.